﻿using System.Collections.ObjectModel;
using System.ComponentModel;
using Oxage.Common;

namespace Oxage.Models
{
	public partial class WatchViewModel : ViewModelBase
	{
		#region Constructor
		public WatchViewModel()
		{
			this.Items = new ObservableCollection<WatchItem>();

			//if (Settings.IsDesignMode)
			{
				this.Items = new ObservableCollection<WatchItem>()
				{
					new WatchItem() { Name = "G", Value = "01", Comment = "Linear movement" },
					new WatchItem() { Name = "M", Value = "", Comment = "(not set)" },
					new WatchItem() { Name = "X", Value = "100" },
					new WatchItem() { Name = "Y", Value = "-10" },
					new WatchItem() { Name = "Z", Value = "0.01" },
				};
			}
		}
		#endregion

		#region Public properties
		public ObservableCollection<WatchItem> Items
		{
			get
			{
				return this.items;
			}
			set
			{
				if (this.items != value)
				{
					this.items = value;
					OnPropertyChanged("Items");
				}
			}
		}
		private ObservableCollection<WatchItem> items;
		#endregion
	}
}
